//
//  FortuneCollectionViewCell.m
//  SmileWeather
//
//  Created by lanou3g on 15/9/17.
//  Copyright (c) 2015年 陶天海. All rights reserved.
//

#import "FortuneCollectionViewCell.h"

@implementation FortuneCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        
        self.startImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, (kWidth - 80)/3, (kWidth - 80)/3)];
        self.startImage.backgroundColor = [UIColor redColor];
        self.startImage.layer.cornerRadius = (kWidth - 80)/3 / 2;
        self.startImage.layer.masksToBounds = YES;
        self.startImage.layer.borderWidth = 2;
        self.startImage.layer.borderColor = [[UIColor whiteColor] CGColor];
        [self addSubview:self.startImage];
       
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.startImage.bounds.size.height + 5, self.startImage.bounds.size.width, 20)];
        self.titleLabel.font = [UIFont systemFontOfSize:14.0];
        self.titleLabel.textColor = [UIColor whiteColor];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        //self.titleLabel.backgroundColor = [UIColor grayColor];
        [self addSubview:self.titleLabel];
        
        self.birthsLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.titleLabel.frame.origin.y + 20, self.titleLabel.bounds.size.width, 20)];
        self.birthsLabel.font = [UIFont systemFontOfSize:14.0];
        self.birthsLabel.textColor = [UIColor whiteColor];
        self.birthsLabel.textAlignment = NSTextAlignmentCenter;
        //self.birthsLabel.backgroundColor = [UIColor grayColor];
        [self addSubview:self.birthsLabel];
    }
    return self;
}
@end
